}
// All the children after this are days, and get removed when we update the calendar
- this._firstDayIndex = this.actor.get_children().length;
+ this._firstDayIndex = this.actor.get_n_children();
},
_onStyleChange: function(actor, event) {
const Shell = imports.gi.Shell;
const GnomeSession = imports.misc.gnomeSession;
-const Lightbox = imports.ui.lightbox;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
const Tweener = imports.ui.tweener;
this._applicationList.connect('actor-added',
Lang.bind(this, function() {
- if (this._applicationList.get_children().length == 1)
+ if (this._applicationList.get_n_children() == 1)
scrollView.show();
}));
this._applicationList.connect('actor-removed',
Lang.bind(this, function() {
- if (this._applicationList.get_children().length == 0)
+ if (this._applicationList.get_n_children() == 0)
scrollView.hide();
}));
this._grid.queue_relayout();
},
- removeAll: function () {
- this._grid.get_children().forEach(Lang.bind(this, function (child) {
- child.destroy();
- }));
+ removeAll: function() {
+ this._grid.destroy_all_children();
},
addItem: function(actor) {
},
getItemAtIndex: function(index) {
- return this._grid.get_children()[index];
+ return this._grid.get_child_at_index(index);
},
visibleItemsCount: function() {
- return this._grid.get_children().length - this._grid.get_n_skip_paint();
+ return this._grid.get_n_children() - this._grid.get_n_skip_paint();
}
});
'const stage = global.stage; ' +
'const color = function(pixel) { let c= new Clutter.Color(); c.from_pixel(pixel); return c; }; ' +
/* Special lookingGlass functions */
- 'const it = Main.lookingGlass.getIt(); ' +
+ 'const it = Main.lookingGlass.getIt(); ' +
'const r = Lang.bind(Main.lookingGlass, Main.lookingGlass.getResult); ';
const HISTORY_KEY = 'looking-glass-history';
},
_updateWindowList: function() {
- this.actor.get_children().forEach(function (actor) { actor.destroy(); });
+ this.actor.destroy_all_children();
let windows = global.get_window_actors();
let tracker = Shell.WindowTracker.get_default();
for (let i = 0; i < windows.length; i++) {
this._previousObj = null;
this._obj = obj;
- this._container.get_children().forEach(function (child) { child.destroy(); });
+ this._container.destroy_all_children();
let hbox = new St.BoxLayout({ style_class: 'lg-obj-inspector-title' });
this._container.add_actor(hbox);
button.label = label;
}
- if (this._buttonBox.get_children().length > 0)
+ if (this._buttonBox.get_n_children() > 0)
this._buttonFocusManager.remove_group(this._buttonBox);
this._buttonBox.add(button);
},
prepareNotificationStackForShowing: function() {
- if (this.notificationStack.get_children().length > 0)
+ if (this.notificationStack.get_n_children() > 0)
return;
for (let i = 0; i < this.source.notifications.length; i++) {
},
doneShowingNotificationStack: function() {
- let notificationActors = this.notificationStack.get_children();
for (let i = 0; i < this._stackedNotifications.length; i++) {
let stackedNotification = this._stackedNotifications[i];
let notification = stackedNotification.notification;
this._stackedNotifications.push(stackedNotification);
if (!this.source.isChat)
notification.enableScrolling(false);
- if (this.notificationStack.get_children().length > 0)
+ if (this.notificationStack.get_n_children() > 0)
notification.setIconVisible(false);
this.notificationStack.add(notification.actor);
notification.expand(false);
},
_onSummaryBoxPointerContentUpdated: function() {
- if (this._summaryBoxPointerItem.notificationStack.get_children().length == 0)
+ if (this._summaryBoxPointerItem.notificationStack.get_n_children() == 0)
this._hideSummaryBoxPointer();
this._adjustSummaryBoxPointerPosition();
// We should be sure to hide the box pointer if all notifications in it are destroyed while
// it is hiding, so that we don't show an an animation of an empty blob being hidden.
if (this._summaryBoxPointerState == State.HIDING &&
- this._summaryBoxPointerItem.notificationStack.get_children().length == 0) {
+ this._summaryBoxPointerItem.notificationStack.get_n_children() == 0) {
this._summaryBoxPointer.actor.hide();
return;
}
const ContactDisplay = imports.ui.contactDisplay;
const Dash = imports.ui.dash;
const DND = imports.ui.dnd;
-const Lightbox = imports.ui.lightbox;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const Panel = imports.ui.panel;
},
isEmpty: function() {
- return this.box.get_children().length == 0;
+ return this.box.get_n_children() == 0;
},
isChildMenu: function(menu) {
* Remove all results from this display.
*/
clear: function() {
- this.actor.get_children().forEach(function (actor) { actor.destroy(); });
+ this.actor.destroy_all_children();
},
/**
this._applicationList.connect('actor-added',
Lang.bind(this, function() {
- if (this._applicationList.get_children().length == 1)
+ if (this._applicationList.get_n_children() == 1)
scrollView.show();
}));
this._applicationList.connect('actor-removed',
Lang.bind(this, function() {
- if (this._applicationList.get_children().length == 0)
+ if (this._applicationList.get_n_children() == 0)
scrollView.hide();
}));
},
let groups = this._contentArea.get_children();
for (let i = 0; i < groups.length; i++) {
let group = groups[i];
- if (group.get_children().length == 0)
+ if (group.get_n_children() == 0)
group.destroy();
}
},